package model;

/**
 * Armazena informações sobre os erros semânticos.
 * 
 * @author Alen e Jody
 * 
 */
public class SemanticError extends CompileError {
    private VarType typeExpected;
    private VarType typeOccurred;

    public SemanticError(String lexeme, ErrorType type, int lineNumber) {
	super(lexeme, type, lineNumber);
    }

    public SemanticError(String lexeme, ErrorType type, int lineNumber,
	    VarType expected, VarType occured) {
	super(lexeme, type, lineNumber);
	this.typeExpected = expected;
	this.typeOccurred = occured;
    }

    public VarType getTypeExpected() {
	return typeExpected;
    }

    public VarType getTypeOccurred() {
	return typeOccurred;
    }
}
